package Z11_3_ReentrantLock;

import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.ReentrantLock;

/**
 * @author： pang-yun
 * @date： 2021-11-04 13:55
 * 功能目的 ：用于
 */

public class ConditionDemo {
    private static ReentrantLock lock = new ReentrantLock(true);
    public static void main(String[] args) throws InterruptedException {
        // 创建一个 新的条件变量
        Condition condition = lock.newCondition();
        lock.lock();
        condition.await();
        condition.signal();

    }
}
